import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import Tree from '@feidao/widgets/fd-w000001';

export default async function a011(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const check_id = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="check-id"]').value;
	if (!check_id) {
		alert('请输入要选择节点的id');
	} else {
		const tree = fd.data.node.querySelector<Tree>('#fd-w000001-001');
		// debugger
		tree.check_node(check_id.split(','));
	}
	fd.data.node.querySelector<HTMLTextAreaElement>('[data-feidao-id="fd-w000001-005"]').innerHTML = `const check_id = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="check-id"]').value;
if (!check_id) {
	alert('请输入要选择节点的id');
} else {
	const tree = fd.data.node.querySelector<Tree>('#fd-w000001-001');
	// debugger
	tree.check_node(check_id.split(','));
}
`;
}
